import { get,post } from '../http';

/**
 * 回修通知单
 * getNoticeList //获取列表
 * getFlowCardCodeDetail //根据流转卡号获取信息
 * getFlowCodeDrop 获取流转卡不带A
 * addNotic 新增
 * editNotice 编辑
 * getChildList 查询子项列表
 */
export function notice(){
    return {
        getNoticeList:({page,limit}:any,paramsData:any) =>{
            return post({
                url:`/dwWorkShop/mendNotice/findMendNotice?page=${page}&limit=${limit}`,
                data:paramsData
            })
        },
        getFlowCardCodeDetail:({flowCardCode}:any) => { 
            return post({
                url:`/aps/circulatCard/infoCirculatCard?flowCardCode=${flowCardCode}`,
            })
        },
        getFlowCodeDrop:(params:any) => {
            return get({
                url:'/aps/circulatCard/dropCirculatCard',
                data:params
            })
        },
        addNotic:(params:any) => {
            return post({
                url:'/dwWorkShop/mendNotice/saveMendNotice',
                data:params
            })
        },
        editNotice:(params:any) => {
            return post({
                url:'/dwWorkShop/mendNotice/updateMendNotice',
                data:params
            })
        },
        getChildList:({id}:any) => {
           return get({
               url:`/dwWorkShop/mendNotice/findMendNoticeDetailed?id=${id}`
           })  
        }
    }
}

